home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13536 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: alpha2.csd.uwm.edu!mardavuy
  2. From: mardavuy@alpha2.csd.uwm.edu (Mario David Uy)
  3. Newsgroups: comp.lang.c
  4. Subject: Help, I think with an array
  5. Date: 8 Apr 1996 17:11:49 GMT
  6. Organization: Information & Media Technologies, University of Wisconsin - Milwaukee
  7. Distribution: world
  8. Message-ID: <4kbhcl$p4l@uwm.edu>
  9. NNTP-Posting-Host: 129.89.169.2
  10.  
  11. I am a beginner to programming and I have a problem.
  12. Well, I have this one table that I want to use.  I looks somewhat like this.
  13.  
  14. Age           points
  15. 30             -3
  16. 31             -2
  17. 32-33          -1
  18. 34              0
  19. 35-36           1
  20. ...            ...
  21.  
  22. What I want the program to do is have a user input the age value and then the
  23. program will give the point value.  
  24.  
  25. I have no idea how to do this, but I think I need to use an array
  26. (I sure I could use if...else but I want to try to use an array.
  27. Also I have seven of these tables)
  28.  
  29. Thanks,
  30. David 
  31. mardavuy@csd.uwm.udu
  32. -- 
  33. -------------------------------------------------------------------------------
  34. ||                                          ||Is it gonna be hide or seek,   ||
  35. ||  Mario David Uy                          ||  is it gonna be win or lose?  ||
  36. ||      mardavuy@csd.uwm.edu                ||Is it gonna be pride that keeps||
  37.